package src.elevent;

public class Example_06 {

    public static void showArea(double r) throws NewException {
        if (r < 20) {
            throw new NewException(r);
        }
        double area = 3.14*r*r;
        System.out.println("圆的面积："+area);
    }

    public static void main(String[] args) {
        try {
            showArea(10);
        } catch (NewException e) {
            System.out.println(e);
        }
    }
}
